package com.xiaohong.storage.feign;

import com.xiaohong.storage.fallback.StorageFallback;
import com.xiaohong.storage.pojo.StorageTbl;
import entity.Result;
import entity.StatusCode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name="storage-service",contextId = "storageTbl",fallback = StorageFallback.class)
public interface StorageTblFeign {

    /***
     * 根据ID修改StorageTbl数据
     * @param storageTbl
     * @param id
     * @return
     */
    @PutMapping(value = "/storageTbl/{id}" )
    Result update(@RequestBody StorageTbl storageTbl, @PathVariable Integer id);

    /***
     * 多条件搜索StorageTbl数据
     * @param storageTbl
     * @return
     */
    @PostMapping(value = "/storageTbl/search" )
    Result<List<StorageTbl>> findList(@RequestBody(required = false) StorageTbl storageTbl);


}
